package la.iok.hzsvn.lewin.movie.core.movieservice.param;

import java.util.Objects;

/**
 * 相册的参数
 * @since 1.1.1
 */
public class ShopAlbumParam extends NameSequenceParam {
    /**
     * 父目录的id.如果为null,则在根目录下
     */
    private Long parentId;
    /**
     * 类型,0：文件，1：目录
     */
    private Integer type;

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ShopAlbumParam)) return false;
        if (!super.equals(o)) return false;
        ShopAlbumParam that = (ShopAlbumParam) o;
        return Objects.equals(parentId, that.parentId) && Objects.equals(type, that.type);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), parentId, type);
    }

    @Override
    public String toString() {
        return "ShopAlbumParam{" +
                "parentId=" + parentId +
                ", type=" + type +
                "} " + super.toString();
    }
}
